<script setup>
let hotlist = defineProps(['hots'])
</script>

<template>
  <div class="hots">
    <div class="hot-list">
      <h2>热度榜</h2>
      <ul v-for="(hot,index) in hotlist.hots" :key="hot.id" class="hot">
        <li class="hot-item">
          {{index+=1}}.
          <a href="/xiangqing">{{ hot.title }}</a>
        </li>
      </ul>
    </div>
  </div>
</template>

<style scoped>
.hots {
    border-radius: 5px;
  background-color: rgb(245, 245, 245);
  width: 25%;
  display: flex;
  float: left;
  margin-top: 20px ;
  margin-right: 160px;
  margin-left: 15px;
}

.hot-list {
}

.hot {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hot-item {
  font-family: fantasy;
  font-weight: 300;
  flex: 1; /* 设置 li 元素的宽度平均分配，可以根据需要调整 */
  margin: 0 10px 10px 0; /* 设置 li 元素之间的间距，可以根据需要调整 */
}
.hot-item a {
  text-decoration: none;
}

.hot-list h2 {
  font-family: Arial;
}
</style>
